package internal

import "k9-panel/app/service/contract"

type svcApi struct {
	Project       contract.IProject
	Environment   contract.IEnvironment
	BaseConfig    contract.IBaseConfig
	DerivedConfig contract.IDerivedConfig
	HistoryConfig contract.IHistoryConfig
	UserToken     contract.IUserToken
	Account       contract.IAccount
}

var (
	svc           svcApi
	Project       contract.IProject
	Environment   contract.IEnvironment
	BaseConfig    contract.IBaseConfig
	DerivedConfig contract.IDerivedConfig
	HistoryConfig contract.IHistoryConfig
	UserToken     contract.IUserToken
	Account       contract.IAccount
)

func init() {
	svc = svcApi{
		Project:       &ProjectService{},
		Environment:   &EnvironmentService{},
		BaseConfig:    &BaseConfigService{},
		DerivedConfig: &DerivedConfigService{},
		HistoryConfig: &HistoryConfigService{},
		UserToken:     &UserTokenService{},
		Account:       &AccountService{},
	}
	Project = svc.Project
	Environment = svc.Environment
	BaseConfig = svc.BaseConfig
	DerivedConfig = svc.DerivedConfig
	HistoryConfig = svc.HistoryConfig
	UserToken = svc.UserToken
	Account = svc.Account
}
